/* Copyright 2011 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

.raw-button,
.raw-button:hover,
.raw-button:active {
  -webkit-box-shadow: none;
  background-color: transparent;
  background-repeat: no-repeat;
  border: none;
  min-width: 0;
  padding: 1px 6px;
}

list > * {
  -webkit-box-align: center;
  box-sizing: border-box;
  border-radius: 0;
  display: -webkit-box;
  height: 32px;
  border: none;
  margin: 0;
  transition: .15s background-color;
}

list:not([disabled]) > :hover {
  background-color: #e4ecf7;
}

list:not([hasElementFocus]) > [selected],
list:not([hasElementFocus]) > [lead][selected] {
  background-color: #d0d0d0;
  background-image: none;
}

list[hasElementFocus] > [selected],
list[hasElementFocus] > [lead][selected],
list:not([hasElementFocus]) > [selected]:hover,
list:not([hasElementFocus]) > [selected][lead]:hover {
  background-color: #bbcee9;
  background-image: none;
}

list[disabled] {
  opacity: 0.6;
}

list > .heading {
  color: #666666;
}

list > .heading:hover {
  background-color: transparent;
  border-color: transparent;
}

list .deletable-item {
  -webkit-box-align: center;
}

list .deletable-item > :first-child {
  -webkit-box-align: center;
  -webkit-box-flex: 1;
  display: -webkit-box;
  padding-inline-end: 5px;
}

list .close-button {
  background-color: transparent;
  background-image: url("../images/close_bar.png");
  border: none;
  display: block;
  height: 16px;
  opacity: 1;
  transition: .15s opacity;
  width: 16px;
}

list > *:not(:hover):not([lead]) .close-button,
list > *:not(:hover):not([selected]) .close-button,
list:not([hasElementFocus]) > *:not(:hover) .close-button,
list[disabled] .close-button,
list .close-button[disabled] {
  opacity: 0;
  pointer-events: none;
}

list .close-button:hover {
  background-image: url("../images/close_bar_h.png");
}

list .close-button:active {
  background-image: url("../images/close_bar_p.png");
}

list .static-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

list[inlineeditable] input {
  box-sizing: border-box;
  margin: 0;
  width: 100%;
}

list[inlineeditable] > :not([editing]) [displaymode="edit"],
list[inlineeditable] > [editing] [displaymode="static"] {
  display: none;
}

list > [editing] input:invalid {
  background-color: pink;
}
